package kr.hkit.powerjava.chapter21.submit;


public class Ex03Test {
	public static void main(String[] args) {
		
		Ex03 ba = new Ex03();
		ba.setBalance(-100000);
		ba.deposit(100000);
		
		System.out.println("정상 입금처리: 입금금액= " + ba.deposit(100000) +", 잔금=" + ba.getBalance());
		
		int w = 0;
		
		try {
			w = ba.withdraw(150000);
			System.out.println("정상 출금처리: 인출금액= " + w + ", 잔금="+ ba.getBalance());
		} catch (InvalidWithdraw e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		} finally {
			System.out.println("정상 출금처리: 인출금액= " + w + ", 잔금="+ ba.getBalance());
		}
	}
}
